/*!
 * \file tbinary.h
 *
 * \brief 共通定义
 *
 * All Rights Reserved Copyright (C) 2014 broada,Co.,Ltd.\n
 * 共通使用的宏和结构体
 *
 * \version 1.0
 * \author jikw
 * \date 2017/02/09
 *
 */

#ifndef _TBINARY_H_
#define _TBINARY_H_

#include "conntrack.h"
#include "module.h"
#include "frreport_comm.h"
#include "frbyte_buffer.h"

#define TIMEOUT                          5*60//单位秒
#define ARRAY_LEN                        128

union int64_double_bits {
    int64_t int_bits;
    double double_bits;
};

int thrift_tbinary_detect(Conntrack *p_st_conn, Apm_packet *p_st_packet);

void thrift_tbinary_session_reset(void *p_private_session);

int thrift_tbinary_req_analyze(Conntrack *p_st_conn
                                , Apm_packet *p_st_packet
                                , Frhash_header *p_st_hash_report
                                , L7_session *p_st_session);

int thrift_tbinary_resp_analyze(Conntrack *p_st_conn
                                 , Apm_packet *p_st_packet
                                 , Frhash_header *p_st_hash_report
                                 , L7_session *p_st_session);

#endif
